<?php namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Http\Requests\AdminLoginRequest;
use Auth;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use Validator;

class AuthController extends Controller {

	/*
	|--------------------------------------------------------------------------
	| Registration & Login Controller
	|--------------------------------------------------------------------------
	|
	| This controller handles the registration of new users, as well as the
	| authentication of existing users. By default, this controller uses
	| a simple trait to add these behaviors. Why don't you explore it?
	|
	*/

	use AuthenticatesAndRegistersUsers;

	public function getAdminLogin()
	{
		return view('admin/site/login');
	}

	public function postAdminLogin(AdminLoginRequest $request)
	{
		return redirect('admin/index');
	}

	public function getAdminLogout()
	{
		Auth::logout();
		return redirect('auth/admin_login');
	}
}
